//
//  TestFourThViewController.m
//  TestConstriant
//
//  Created by jyjx on 2019/4/18.
//  Copyright © 2019 apple. All rights reserved.
//

#import "TestFourThViewController.h"
#import "TestFiveViewController.h"
@interface TestFourThViewController ()
@property (weak, nonatomic) IBOutlet UIButton *testButton;

@end

@implementation TestFourThViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
//    [self.testButton.imageView setBackgroundColor:[UIColor redColor]];
//    self.testButton.titleLabel.backgroundColor = [UIColor greenColor];
    [self.testButton.layer setCornerRadius:3];
    [self.testButton.layer setBorderColor:[UIColor lightGrayColor].CGColor];
    [self.testButton.layer setBorderWidth:0.5];
    self.testButton.imageEdgeInsets = UIEdgeInsetsMake(0,10,0,-self.testButton.titleLabel.frame.size.width - self.testButton.frame.size.width + self.testButton.imageView.frame.size.width);
    self.testButton.titleEdgeInsets = UIEdgeInsetsMake(0,-self.testButton.imageView.frame.size.width - self.testButton.frame.size.width + self.testButton.titleLabel.frame.size.width,0,-10 );
    
//    utton.titleEdgeInsets = UIEdgeInsetsMake(.0, - button.imageView.bounds.size.width - 10.0, .0, button.imageView.bounds.size.width);
//    button.imageEdgeInsets = UIEdgeInsetsMake(.0, button.titleLabel.bounds.size.width, .0, - button.titleLabel.bounds.size.width);
    
    [self.testButton setBackgroundColor:[UIColor grayColor]];
    
}
- (IBAction)test:(id)sender {
    TestFiveViewController *vc = [[UIStoryboard storyboardWithName:@"test" bundle:nil] instantiateViewControllerWithIdentifier:@"TestFiveViewController"];
    
    vc.view.backgroundColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:0.4];
    vc.modalPresentationStyle = UIModalPresentationCurrentContext;
    [self presentViewController:vc animated:YES completion:nil];
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
